package cn.source.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.source.mapper.PartyHeartfeltMapper;
import cn.source.domain.PartyHeartfelt;
import cn.source.service.IPartyHeartfeltService;

/**
 * 心愿Service业务层处理
 * 
 * @author sourcebyte.vip
 * @date 2024-11-22
 */
@Service
public class PartyHeartfeltServiceImpl implements IPartyHeartfeltService 
{
    @Autowired
    private PartyHeartfeltMapper partyHeartfeltMapper;

    @Override
    public List<PartyHeartfelt> selectPartyHeartfeltByUserId(Long userId,Long heartfeltTypeInt) {
        return partyHeartfeltMapper.selectPartyHeartfeltByUserId(userId,heartfeltTypeInt);
    }
    /**
     * 查询心愿
     * 
     * @param id 心愿主键
     * @return 心愿
     */
    @Override
    public PartyHeartfelt selectPartyHeartfeltById(Long id)
    {
        return partyHeartfeltMapper.selectPartyHeartfeltById(id);
    }

    /**
     * 查询心愿列表
     * 
     * @param partyHeartfelt 心愿
     * @return 心愿
     */
    @Override
    public List<PartyHeartfelt> selectPartyHeartfeltList(PartyHeartfelt partyHeartfelt)
    {
        return partyHeartfeltMapper.selectPartyHeartfeltList(partyHeartfelt);
    }

    /**
     * 新增心愿
     * 
     * @param partyHeartfelt 心愿
     * @return 结果
     */
    @Override
    public int insertPartyHeartfelt(PartyHeartfelt partyHeartfelt)
    {
        return partyHeartfeltMapper.insertPartyHeartfelt(partyHeartfelt);
    }

    /**
     * 修改心愿
     * 
     * @param partyHeartfelt 心愿
     * @return 结果
     */
    @Override
    public int updatePartyHeartfelt(PartyHeartfelt partyHeartfelt)
    {
        return partyHeartfeltMapper.updatePartyHeartfelt(partyHeartfelt);
    }

    /**
     * 批量删除心愿
     * 
     * @param ids 需要删除的心愿主键
     * @return 结果
     */
    @Override
    public int deletePartyHeartfeltByIds(Long[] ids)
    {
        return partyHeartfeltMapper.deletePartyHeartfeltByIds(ids);
    }

    /**
     * 删除心愿信息
     * 
     * @param id 心愿主键
     * @return 结果
     */
    @Override
    public int deletePartyHeartfeltById(Long id)
    {
        return partyHeartfeltMapper.deletePartyHeartfeltById(id);
    }
}
